home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_c
/
cgraphix
/
chist.c
< prev
next >
Wrap
Text File
|
1986-05-28
|
772b
|
49 lines
/* «RM120»«PL99999»«TS4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76» */
#include <stdio.h>
#define EXTERN extern
#include <typedef.h>
void HistoDem()
{
int i,DisplyLen,HatchDen;
PlotArray a;
double r;
int Hatch;
DisplyLen = 10;
for (i = 0; i <= DisplyLen; i++) {
a[2 * i] = i;
a[1+2*i] = (i+1) / 12.;
}
SetColorWhite();
SetBackground(0);
DefineWindow(1,0,0,XMaxGlb,YMaxGlb);
DefineHeader(1,"A BAR CHART WITH HATCHING");
DefineWorld(1, -10., 0., 10., 1.0);
SelectWorld(1);
SetHeaderOn();
SelectWindow(1);
DrawBorder();
Hatch = TRUE;
HatchDen = 7;
DrawHistogram(a,(int)-DisplyLen,(int)Hatch,(int)-HatchDen);
}
main()
{
InitGraphic();
HistoDem();
inkey();
LeaveGraphic();
}